//
//  DCSuvAndCarLabel.m
//  JiuyaoDriver
//
//  Created by 大橙子 on 2018/11/10.
//  Copyright © 2018 Tomous. All rights reserved.
//

#import "DCSuvAndCarLabel.h"

@implementation DCSuvAndCarLabel
-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUpUI];
    }
    return self;
}
-(void)setUpUI {
    self.suvLabel = [[DCImageAndTextLabel alloc]init];
    self.suvLabel.imageView.image = IMAGENAME(@"SUV");
    self.suvLabel.textLabel.textColor = [UIColor redColor];
//    self.suvLabel.textLabel.text = [NSString stringWithFormat:@"%@ 台",self.suv];
    [self addSubview:self.suvLabel];
    
    self.carLabel = [[DCImageAndTextLabel alloc]init];
    self.carLabel.imageView.image = IMAGENAME(@"car");
    self.carLabel.textLabel.textColor = [UIColor redColor];
//    self.carLabel.textLabel.text = [NSString stringWithFormat:@"%@ 台",self.car];
    [self addSubview:self.carLabel];
}

-(void)layoutSubviews {
    [super layoutSubviews];
    self.suvLabel.frame = CGRectMake(0, 0, self.width/2, self.height);
    self.carLabel.frame = CGRectMake(self.suvLabel.right, 0, self.width/2, self.height);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
